package com.remote.filetrans.api;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xiongzhiwen
 * @version 1.0
 * @description: TODO
 * @date 2024/4/11 9:28
 */
@RestController
@FeignClient(name = "FileTransFeign", url = "${feign.client.word2pdf-feignurl:#{null}}")
public interface FileTrans_Feign {

    @RequestMapping(value = "/word2pdf", method = RequestMethod.POST, produces = {MediaType.APPLICATION_JSON_VALUE}, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    byte[] word2pdf(@RequestPart("file") MultipartFile file);


    @RequestMapping(value = "/word2pdfInputStream", method = RequestMethod.POST)
    byte[] word2pdf(HttpServletRequest request);
}
